#include "about_box.h"
#include "ui_about_box.h"

// Qt Designer "helpfully" adds custom markup to any HTML put into a QTextEdit, which includes such
// things as hard-coded font names and sizes from the platform where the application was built.
// The only workaround is to set the text directly from code.  Nokia has made it clear they have
// no intention of fixing this.
static const char kLicenseHtml[] =
    "<p>PackMerge is copyright &copy;2011 by Brian Ellis, and is licensed under the "
    "<a href='http://www.apache.org/licenses/LICENSE-2.0'>"
    "Apache License version 2.0</a>.</p>"
    "<p>PackMerge uses technology from the following third parties:</p>"
    "<ul>"
    "<li>Qt 4.7.4 by Nokia</li>"
    "<li>QuaZIP 0.43 by Sergey A. Tachenov</li>"
    "<li>QJson 0.7.1 by Flavio Castelli</li>"
    "</ul>"
    "<p>All of the above software is licensed under the "
    "<a href='http://www.gnu.org/licenses/lgpl-2.1.html'>Lesser GNU Public License (LGPL) "
    "version 2.1</a>. "
    "A copy of both of the above licenses should have been distributed with this software; if it "
    "was not, please visit <a href='http://sites.google.com/site/caffeinix/minecraft/packmerge'>"
    "the web site for this product</a> and download a complete installation of PackMerge "
    "from there.</p>";

AboutBox::AboutBox(QWidget *parent) : QWidget(parent), ui(new Ui::AboutBox) {
  ui->setupUi(this);
  ui->license_textedit_->setHtml(kLicenseHtml);
}

AboutBox::~AboutBox() {
  delete ui;
}
